﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DomainModel.Abstract;
using DomainModel.Entities;
using System.Data.Linq;

namespace DomainModel.Concrete
{
    public class SQLProductsRepository : IProductsRepository
    {
        private Table<Product> productsTable;

        public SQLProductsRepository(string connectionString)
        {
            productsTable = new DataContext(connectionString).GetTable<Product>();
        }

        public IQueryable<Product> Products
        {
            get { return productsTable; }
        }
    }
}
